package com.woniu.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 订单主表
 * @TableName order
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class Order implements Serializable {
    /**
     * 订单编号
     */
    private String orderId;

    /**
     * 关联customer
     */
    private Integer customerId;

    /**
     * 
     */
    private BigDecimal totalPrice;

    /**
     * 订单状态：1: 待付款 2:已付款 3: 已收货 4:已取消 5: 已完成
     */
    private Integer status;

    /**
     * 地址
     */
    private Integer addressId;

    /**
     * 下单时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;


    private static final long serialVersionUID = 1L;
}